#ifndef CUBICCLASS_H
#define CUBICCLASS_H
#include "cubic.h"

class CubicClass
{
public:
    CubicClass();


    static int cubicInit(CUBIC_STRUCT * ci);
    static int cubicSetSegmentTime(CUBIC_STRUCT * ci, double time);
    static double cubicGetSegmentTime(CUBIC_STRUCT * ci);
    static int cubicSetInterpolationRate(CUBIC_STRUCT * ci, int rate);
    static int cubicGetInterpolationRate(CUBIC_STRUCT * ci);
    static int cubicAddPoint(CUBIC_STRUCT * ci, double point);
    static int cubicCheckForcaseVelLimit(CUBIC_STRUCT * ci, double forcasePoseIn, double &velOut);
    static int cubicAddVelFilterPoint(CUBIC_STRUCT * ci, double deltaPos);
    static int cubicAddVelLimitPoint(CUBIC_STRUCT * ci, double velLimit,double accLimit,double moveDirection);
    static int cubicOffset(CUBIC_STRUCT * ci, double offset);
    static double cubicGetInterpolationIncrement(CUBIC_STRUCT * ci);
    static CUBIC_COEFF cubicGetCubicCoeff(CUBIC_STRUCT * ci);
    static int cubicFilled(CUBIC_STRUCT * ci);
    static double cubicInterpolate(CUBIC_STRUCT * ci, double *x,	/* same as
                                       return val
                                     */
                       double *v,	/* velocity */
                       double *a,	/* accel */
                       double *j);	/* jerk */
    static int cubicNeedNextPoint(CUBIC_STRUCT * ci);
    static int cubicDrain(CUBIC_STRUCT * ci);
};

#endif // CUBICCLASS_H
